From 329683f74662aeb60bad3e4c93bb91dcb5c2e5b3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Timm=20B=C3=A4der?= Date: Fri, 8 Dec 2017 16:58:06 +0100 Subject: [PATCH] snapshot: Don't create blur nodes with radius 0 --- gtk/gtksnapshot.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gtk/gtksnapshot.c b/gtk/gtksnapshot.c index a9882db151..ac18bb514c 100644 --- a/gtk/gtksnapshot.c +++ b/gtk/gtksnapshot.c @@ -346,12 +346,18 @@ gtk_snapshot_collect_blur (GtkSnapshot *snapshot, const char *name) { GskRenderNode *node, *blur_node; + double radius; node = gtk_snapshot_collect_default (snapshot, state, nodes, n_nodes, name); if (node == NULL) return NULL; - blur_node = gsk_blur_node_new (node, state->data.blur.radius); + radius = state->data.blur.radius; + + if (radius == 0.0) + return node; + + blur_node = gsk_blur_node_new (node, radius); if (name) gsk_render_node_set_name (blur_node, name); -- 2.30.2